<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        input {
            outline: none;
        }

        * {
            text-decoration: none;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            text-shadow: none;
        }

        .bg {
            position: absolute;
            width: 100%;
            height: 850px;
            background: url(img/xingkong.png) no-repeat;
            background-size: 100% 100%;
        }

        .register {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            border-radius: 10%;
            opacity: 1;
            width: 40%;
            height: 50%;
            background-color: #fff;
            opacity: .8;
        }

        .one {
            text-align: center;
            line-height: 130px;
            font-size: 50px;
            font-weight: 300;
            height: 30%;
            /* background-color: red; */
        }

        .two {
            margin: 0 auto;
            height: 20%;
            width: 70%;
            /* background-color: aquamarine; */
            /* border-bottom: 1px solid blue; */
        }

        .three {
            margin: 0 auto;
            height: 20%;
            width: 70%;
            /* background-color: aquamarine; */
            /* border-bottom: 1px solid blue; */
        }

        .four {
            display: block;
            margin: 0 auto;
            text-align: center;
            /* background-color: pink; */
            background: -webkit-gradient(linear, 0 100%, 100% 100%, from(yellow), to(red));
            border-radius: 15%;
            font-size: 20px;
            line-height: 58px;
            height: 14%;
            width: 23%;
            transition: all .5s;
        }

        .four:hover {
            transform: scale(1.05);
            
        }

        .five {
            text-align: center;
            line-height: 99px;
        }

        p {
            font-size: 20px;
            transform: translate(40px, 31px);
        }

        input {
            transform: translate(100px, 0);
            width: 65%;
            height: 50%;
        }
    </style>
</head>

<body>
    <form action="">
        <div class="bg">
            <div class="register">
                <div class="one">Login</div>
                <div class="two">
                    <p>账号：</p><input type="text">
                </div>
                <div class="three">
                    <p>密码：</p><input type="text">
                </div>
                <a href="" class="four" style="color:black">登录</a>
                <div class="five">没有账号？点击<a href="login.html" style="color: purple;">注册</a></div>
            </div>
        </div>
    </form>
    <script>
        var enter = document.querySelector(".four");
        var input = document.querySelector("input");
        enter.addEventListener("click",function() {
            if(input.value == "") {
                alert("请输入完整的账号密码")
            } 
        })
    </script>
</body>

</html>